<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title></title>

</head>

<body>
 
    <button type="button" class="btn">按钮</button>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
    <script type="text/javascript">
        $(".btn").on('click', function () {
            $.ajax({
                type: "get",
                url: "http://127.0.0.1:8888/123",
                data: {
                    id: 88,
                    name: 'pp' 
                },
                async: true,
                success: function (res) {
                    console.log(res)
                }
            }); 
        }) 
 
    </script>
</body>

</html> 